<template>
	<view class="scrool-page">
		<view class="list-cont">
			<scroll-view  class="scrool-more" style="height: 100%" scroll-y="true" scroll-with-animation="true">
				<view v-for="(item,index) in detailList" >
					<uni-card :title="'序号:'+(index+1)" @click="showDetail(item)">
						<text class="uni-body">临时托码：{{ item.barcodeContent }}</text><br>	
					</uni-card>
				</view>
			</scroll-view>
		</view>
	</view>
</template>

<script>
	import { getToken } from '@/utils/auth';
	export default {
		data() {
			return {
				detailList:[],
				baseUrl:getApp().globalData.config.baseUrl,
				userName:this.$store.state.user.name,
				orgId:getApp().globalData.config.orgId,
			}
		},
		
		created: function(){
			this.orgId = uni.getStorageSync('orgId');
			this.init();
		},
		
		methods: {
			init(){
				uni.request({
					url:this.baseUrl+'/system/record/temporary',
					data:{
						orgId:this.orgId,
						userName:this.userName,
						attr2:'LSTM',
					},
					method: 'POST',
					header:{
						'authorization': getToken()
					},
					dataType:'json',
					success: (res) =>{
						if(res.data.code == '200'){
							this.detailList = res.data.rows;
						}else{
							uni.showToast({
								title: res.data.msg,
								icon: 'none',
								duration: 2000
							});
						}
						
					}
				})
			},
			
			showDetail(item){
				var url = '/pages/query/product_recpt_query_detail?barcodeContent='+item.barcodeContent;
				uni.navigateTo({
					url: url
				});
			},
		}
	}
</script>

<style lang="scss">
	.main {
		background-color: #fff;
		height: 300upx;
		align-items: center;
		margin-top: 10upx;
	}
	.text-content {
		font-size: 48rpx;
		text-align: center;
	}
	
	.city {
		/* #ifndef APP-PLUS-NVUE */
		display: flex;
		/* #endif */
		flex-direction: row;
		align-items: center;
		justify-content: flex-start;
		// width: 160rpx;
		margin-left: 4px;
		font-size: 26rpx;
	}
	
	.input-view {
		display: flex;
		flex-direction: row;
		flex: 1;
		//background-color: #f8f8f8;
		height: 30px;
		padding: 0 80px;
		flex-wrap: nowrap;
		margin: 7px 0;
		line-height:30px;
		font-size: 26rpx;
	}
	page {
		width: 100%;
		height: 100%;
	}
	
	
	.scrool-page {
		display: flex;
		flex-direction: column;
		width: 100%;
		height: 100%;
	}
	
	.header-cont {
		width: 100%;
		height: 110rpx;
		line-height: 100rpx;
		text-align: center;
		// background: red;
	}
	
	.list-cont {
		flex: 1;
		position: relative;
	
		.scrool-more {
			position: absolute;
			left: 0;
			right: 0;
			top: 0;
			bottom: 0;
		}
	
		.list {
			height: 80rpx;
			line-height: 80rpx;
			text-align: center;
			background: #e0e0e0;
	
		}
	}
	
	
	.footer {
		color: #fff;
		line-height: 100rpx;
		flex: 0 0 100rpx;
		/* 不放大不缩小固定100rpx */
	}
</style>


